(function (e, t) {
  function isPC() {
    const userAgent = e.navigator.userAgent;
    return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent);
  }

  function n() {
    if (isPC()) return;
    t.body
      ? (t.body.style.fontSize = 12 * o + 'px')
      : t.addEventListener('DOMContentLoaded', n);
  }

  function d() {
    if (isPC()) return;
    var e = i.clientWidth / 10;
    i.style.fontSize = e + 'px';
  }

  var i = t.documentElement,
    o = e.devicePixelRatio || 1;
  n();
  d();
  e.addEventListener('resize', d);
  e.addEventListener('pageshow', function (e) {
    e.persisted && d();
  });
  if (o >= 2) {
    var a = t.createElement('body'),
      s = t.createElement('div');
    (s.style.border = '.5px solid transparent'),
      a.appendChild(s),
      i.appendChild(a),
      1 === s.offsetHeight && i.classList.add('hairlines'),
      i.removeChild(a);
  }
})(window, document);